﻿<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
  <!-- EF Runtime content -->
  <edmx:Runtime>
    <!-- SSDL content -->
    <edmx:StorageModels>
      <Schema Namespace="Хранилище SC_DBModel" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
        <EntityType Name="Admins">
          <Key>
            <PropertyRef Name="ID_admin" />
          </Key>
          <Property Name="ID_admin" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="login" Type="nvarchar" MaxLength="40" Nullable="false" />
          <Property Name="passwd" Type="varchar" MaxLength="60" Nullable="false" />
        </EntityType>
        <EntityType Name="Clients">
          <Key>
            <PropertyRef Name="ID_client" />
          </Key>
          <Property Name="ID_client" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="lfname" Type="nvarchar" MaxLength="80" Nullable="false" />
          <Property Name="login" Type="nvarchar" MaxLength="40" Nullable="false" />
          <Property Name="passwd" Type="varchar" MaxLength="60" Nullable="false" />
          <Property Name="email" Type="nvarchar" MaxLength="60" Nullable="false" />
        </EntityType>
        <EntityType Name="EntryInSection">
          <Key>
            <PropertyRef Name="ID_entry" />
          </Key>
          <Property Name="ID_entry" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="ID_section" Type="int" Nullable="false" />
          <Property Name="ID_client" Type="int" Nullable="false" />
          <Property Name="ID_trainer" Type="int" Nullable="false" />
          <Property Name="dateReg" Type="date" Nullable="false" />
        </EntityType>
        <EntityType Name="Section">
          <Key>
            <PropertyRef Name="ID_section" />
          </Key>
          <Property Name="ID_section" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="name" Type="nvarchar" MaxLength="60" Nullable="false" />
          <Property Name="duration" Type="int" Nullable="false" />
          <Property Name="cost" Type="money" Nullable="false" />
          <Property Name="photo" Type="nvarchar" MaxLength="1000" />
          <Property Name="discount" Type="int" />
        </EntityType>
        <EntityType Name="Trainers">
          <Key>
            <PropertyRef Name="ID_trainer" />
          </Key>
          <Property Name="ID_trainer" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="ID_section" Type="int" Nullable="false" />
          <Property Name="lfname" Type="nvarchar" MaxLength="80" Nullable="false" />
          <Property Name="login" Type="nvarchar" MaxLength="40" Nullable="false" />
          <Property Name="passwd" Type="varchar" MaxLength="60" Nullable="false" />
        </EntityType>
        <Association Name="FK_Trainers">
          <End Role="Section" Type="Self.Section" Multiplicity="1" />
          <End Role="Trainers" Type="Self.Trainers" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Section">
              <PropertyRef Name="ID_section" />
            </Principal>
            <Dependent Role="Trainers">
              <PropertyRef Name="ID_section" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK1_EntryInSection">
          <End Role="Section" Type="Self.Section" Multiplicity="1" />
          <End Role="EntryInSection" Type="Self.EntryInSection" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Section">
              <PropertyRef Name="ID_section" />
            </Principal>
            <Dependent Role="EntryInSection">
              <PropertyRef Name="ID_section" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK2_EntryInSection">
          <End Role="Clients" Type="Self.Clients" Multiplicity="1" />
          <End Role="EntryInSection" Type="Self.EntryInSection" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Clients">
              <PropertyRef Name="ID_client" />
            </Principal>
            <Dependent Role="EntryInSection">
              <PropertyRef Name="ID_client" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK3_EntryInSection">
          <End Role="Trainers" Type="Self.Trainers" Multiplicity="1" />
          <End Role="EntryInSection" Type="Self.EntryInSection" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Trainers">
              <PropertyRef Name="ID_trainer" />
            </Principal>
            <Dependent Role="EntryInSection">
              <PropertyRef Name="ID_trainer" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <EntityContainer Name="Хранилище SC_DBModelContainer">
          <EntitySet Name="Admins" EntityType="Self.Admins" Schema="dbo" store:Type="Tables" />
          <EntitySet Name="Clients" EntityType="Self.Clients" Schema="dbo" store:Type="Tables" />
          <EntitySet Name="EntryInSection" EntityType="Self.EntryInSection" Schema="dbo" store:Type="Tables" />
          <EntitySet Name="Section" EntityType="Self.Section" Schema="dbo" store:Type="Tables" />
          <EntitySet Name="Trainers" EntityType="Self.Trainers" Schema="dbo" store:Type="Tables" />
          <AssociationSet Name="FK_Trainers" Association="Self.FK_Trainers">
            <End Role="Section" EntitySet="Section" />
            <End Role="Trainers" EntitySet="Trainers" />
          </AssociationSet>
          <AssociationSet Name="FK1_EntryInSection" Association="Self.FK1_EntryInSection">
            <End Role="Section" EntitySet="Section" />
            <End Role="EntryInSection" EntitySet="EntryInSection" />
          </AssociationSet>
          <AssociationSet Name="FK2_EntryInSection" Association="Self.FK2_EntryInSection">
            <End Role="Clients" EntitySet="Clients" />
            <End Role="EntryInSection" EntitySet="EntryInSection" />
          </AssociationSet>
          <AssociationSet Name="FK3_EntryInSection" Association="Self.FK3_EntryInSection">
            <End Role="Trainers" EntitySet="Trainers" />
            <End Role="EntryInSection" EntitySet="EntryInSection" />
          </AssociationSet>
        </EntityContainer>
      </Schema>
    </edmx:StorageModels>
    <!-- CSDL content -->
    <edmx:ConceptualModels>
      <Schema Namespace="SC_DBModel" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
        <EntityType Name="Admins">
          <Key>
            <PropertyRef Name="ID_admin" />
          </Key>
          <Property Name="ID_admin" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="login" Type="String" MaxLength="40" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="passwd" Type="String" MaxLength="60" FixedLength="false" Unicode="false" Nullable="false" />
        </EntityType>
        <EntityType Name="Clients">
          <Key>
            <PropertyRef Name="ID_client" />
          </Key>
          <Property Name="ID_client" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="lfname" Type="String" MaxLength="80" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="login" Type="String" MaxLength="40" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="passwd" Type="String" MaxLength="60" FixedLength="false" Unicode="false" Nullable="false" />
          <Property Name="email" Type="String" MaxLength="60" FixedLength="false" Unicode="true" Nullable="false" />
          <NavigationProperty Name="EntryInSection" Relationship="Self.FK2_EntryInSection" FromRole="Clients" ToRole="EntryInSection" />
        </EntityType>
        <EntityType Name="EntryInSection">
          <Key>
            <PropertyRef Name="ID_entry" />
          </Key>
          <Property Name="ID_entry" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="ID_section" Type="Int32" Nullable="false" />
          <Property Name="ID_client" Type="Int32" Nullable="false" />
          <Property Name="ID_trainer" Type="Int32" Nullable="false" />
          <Property Name="dateReg" Type="DateTime" Nullable="false" Precision="0" />
          <NavigationProperty Name="Clients" Relationship="Self.FK2_EntryInSection" FromRole="EntryInSection" ToRole="Clients" />
          <NavigationProperty Name="Section" Relationship="Self.FK1_EntryInSection" FromRole="EntryInSection" ToRole="Section" />
          <NavigationProperty Name="Trainers" Relationship="Self.FK3_EntryInSection" FromRole="EntryInSection" ToRole="Trainers" />
        </EntityType>
        <EntityType Name="Section">
          <Key>
            <PropertyRef Name="ID_section" />
          </Key>
          <Property Name="ID_section" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="name" Type="String" MaxLength="60" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="duration" Type="Int32" Nullable="false" />
          <Property Name="cost" Type="Decimal" Precision="19" Scale="4" Nullable="false" />
          <Property Name="photo" Type="String" MaxLength="1000" FixedLength="false" Unicode="true" />
          <Property Name="discount" Type="Int32" />
          <NavigationProperty Name="EntryInSection" Relationship="Self.FK1_EntryInSection" FromRole="Section" ToRole="EntryInSection" />
          <NavigationProperty Name="Trainers" Relationship="Self.FK_Trainers" FromRole="Section" ToRole="Trainers" />
        </EntityType>
        <EntityType Name="Trainers">
          <Key>
            <PropertyRef Name="ID_trainer" />
          </Key>
          <Property Name="ID_trainer" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="ID_section" Type="Int32" Nullable="false" />
          <Property Name="lfname" Type="String" MaxLength="80" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="login" Type="String" MaxLength="40" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="passwd" Type="String" MaxLength="60" FixedLength="false" Unicode="false" Nullable="false" />
          <NavigationProperty Name="EntryInSection" Relationship="Self.FK3_EntryInSection" FromRole="Trainers" ToRole="EntryInSection" />
          <NavigationProperty Name="Section" Relationship="Self.FK_Trainers" FromRole="Trainers" ToRole="Section" />
        </EntityType>
        <Association Name="FK2_EntryInSection">
          <End Role="Clients" Type="Self.Clients" Multiplicity="1" />
          <End Role="EntryInSection" Type="Self.EntryInSection" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Clients">
              <PropertyRef Name="ID_client" />
            </Principal>
            <Dependent Role="EntryInSection">
              <PropertyRef Name="ID_client" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK1_EntryInSection">
          <End Role="Section" Type="Self.Section" Multiplicity="1" />
          <End Role="EntryInSection" Type="Self.EntryInSection" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Section">
              <PropertyRef Name="ID_section" />
            </Principal>
            <Dependent Role="EntryInSection">
              <PropertyRef Name="ID_section" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK3_EntryInSection">
          <End Role="Trainers" Type="Self.Trainers" Multiplicity="1" />
          <End Role="EntryInSection" Type="Self.EntryInSection" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Trainers">
              <PropertyRef Name="ID_trainer" />
            </Principal>
            <Dependent Role="EntryInSection">
              <PropertyRef Name="ID_trainer" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_Trainers">
          <End Role="Section" Type="Self.Section" Multiplicity="1" />
          <End Role="Trainers" Type="Self.Trainers" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Section">
              <PropertyRef Name="ID_section" />
            </Principal>
            <Dependent Role="Trainers">
              <PropertyRef Name="ID_section" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <EntityContainer Name="Entities" annotation:LazyLoadingEnabled="true">
          <EntitySet Name="Admins" EntityType="Self.Admins" />
          <EntitySet Name="Clients" EntityType="Self.Clients" />
          <EntitySet Name="EntryInSection" EntityType="Self.EntryInSection" />
          <EntitySet Name="Section" EntityType="Self.Section" />
          <EntitySet Name="Trainers" EntityType="Self.Trainers" />
          <AssociationSet Name="FK2_EntryInSection" Association="Self.FK2_EntryInSection">
            <End Role="Clients" EntitySet="Clients" />
            <End Role="EntryInSection" EntitySet="EntryInSection" />
          </AssociationSet>
          <AssociationSet Name="FK1_EntryInSection" Association="Self.FK1_EntryInSection">
            <End Role="Section" EntitySet="Section" />
            <End Role="EntryInSection" EntitySet="EntryInSection" />
          </AssociationSet>
          <AssociationSet Name="FK3_EntryInSection" Association="Self.FK3_EntryInSection">
            <End Role="Trainers" EntitySet="Trainers" />
            <End Role="EntryInSection" EntitySet="EntryInSection" />
          </AssociationSet>
          <AssociationSet Name="FK_Trainers" Association="Self.FK_Trainers">
            <End Role="Section" EntitySet="Section" />
            <End Role="Trainers" EntitySet="Trainers" />
          </AssociationSet>
        </EntityContainer>
      </Schema>
    </edmx:ConceptualModels>
    <!-- C-S mapping content -->
    <edmx:Mappings>
      <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
        <EntityContainerMapping StorageEntityContainer="Хранилище SC_DBModelContainer" CdmEntityContainer="Entities">
          <EntitySetMapping Name="Admins">
            <EntityTypeMapping TypeName="SC_DBModel.Admins">
              <MappingFragment StoreEntitySet="Admins">
                <ScalarProperty Name="ID_admin" ColumnName="ID_admin" />
                <ScalarProperty Name="login" ColumnName="login" />
                <ScalarProperty Name="passwd" ColumnName="passwd" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Clients">
            <EntityTypeMapping TypeName="SC_DBModel.Clients">
              <MappingFragment StoreEntitySet="Clients">
                <ScalarProperty Name="ID_client" ColumnName="ID_client" />
                <ScalarProperty Name="lfname" ColumnName="lfname" />
                <ScalarProperty Name="login" ColumnName="login" />
                <ScalarProperty Name="passwd" ColumnName="passwd" />
                <ScalarProperty Name="email" ColumnName="email" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="EntryInSection">
            <EntityTypeMapping TypeName="SC_DBModel.EntryInSection">
              <MappingFragment StoreEntitySet="EntryInSection">
                <ScalarProperty Name="ID_entry" ColumnName="ID_entry" />
                <ScalarProperty Name="ID_section" ColumnName="ID_section" />
                <ScalarProperty Name="ID_client" ColumnName="ID_client" />
                <ScalarProperty Name="ID_trainer" ColumnName="ID_trainer" />
                <ScalarProperty Name="dateReg" ColumnName="dateReg" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Section">
            <EntityTypeMapping TypeName="SC_DBModel.Section">
              <MappingFragment StoreEntitySet="Section">
                <ScalarProperty Name="ID_section" ColumnName="ID_section" />
                <ScalarProperty Name="name" ColumnName="name" />
                <ScalarProperty Name="duration" ColumnName="duration" />
                <ScalarProperty Name="cost" ColumnName="cost" />
                <ScalarProperty Name="photo" ColumnName="photo" />
                <ScalarProperty Name="discount" ColumnName="discount" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Trainers">
            <EntityTypeMapping TypeName="SC_DBModel.Trainers">
              <MappingFragment StoreEntitySet="Trainers">
                <ScalarProperty Name="ID_trainer" ColumnName="ID_trainer" />
                <ScalarProperty Name="ID_section" ColumnName="ID_section" />
                <ScalarProperty Name="lfname" ColumnName="lfname" />
                <ScalarProperty Name="login" ColumnName="login" />
                <ScalarProperty Name="passwd" ColumnName="passwd" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
        </EntityContainerMapping>
      </Mapping>
    </edmx:Mappings>
  </edmx:Runtime>
  <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
  <Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
    <Connection>
      <DesignerInfoPropertySet>
        <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
      </DesignerInfoPropertySet>
    </Connection>
    <Options>
      <DesignerInfoPropertySet>
        <DesignerProperty Name="ValidateOnBuild" Value="true" />
        <DesignerProperty Name="EnablePluralization" Value="false" />
        <DesignerProperty Name="IncludeForeignKeysInModel" Value="true" />
        <DesignerProperty Name="UseLegacyProvider" Value="false" />
        <DesignerProperty Name="CodeGenerationStrategy" Value="Нет" />
      </DesignerInfoPropertySet>
    </Options>
    <!-- Diagram content (shape and connector positions) -->
    <Diagrams></Diagrams>
  </Designer>
</edmx:Edmx>